package com.javaspeak.designpatterns.go4.creational.singleton;

/**
 * The Singleton ensures that only one copy of an instance exists in the same
 * classloader.
 *
 * @author John Dickerson
 */
public class ApplicationSingleton {

    /**
     * Retrieves instance from singleton; builds the square and draws it
     */
    public void drawSquare(){

        ShapeManager.getInstance().buildSquare().draw();
    }

    /**
     * Main method
     *
     * @param args
     */
    public static void main(String[] args) {

        ApplicationSingleton application = new ApplicationSingleton();
        application.drawSquare();
    }
}
